import router from './router';
import store from './store/store';

router.beforeEach((to, from, next) => {
  sessionStorage.setItem('prev', to.path);
  document.title = to.meta.title || '';
  try {
    next();
  } catch (e) {
    console.log(e);
    next('/404');
  }
});
